package com.mm.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.File;

@ConfigurationProperties(prefix = "custom")
public class CustomProperties {
	/**
	 * 图片存放目录
	 */
	private String pictureSaveDir;

	public String getPictureSaveDir() {
		String separator = File.separator;
		if (pictureSaveDir.endsWith(separator)) {
			return pictureSaveDir;
		} else {
			return pictureSaveDir + separator;
		}
	}

	public void setPictureSaveDir(String pictureSaveDir) {
		this.pictureSaveDir = pictureSaveDir;
	}
}
